import { Base } from '../utils/base.js';

class Index extends Base {
    constructor() {
        super();
    }
	//客服
    get_kefu_mobile(callback) {
        var params = {
            url: 'index/kefu',
            type: 'get',
            loading: false,
        };
        this.apiRequest(params, callback);
    } 
	//广告图
    get_banner_list(data,callback) {
        var params = {
            url: 'index/banner',
            type: 'get',
            loading: false,
			data:data
        };
        this.apiRequest(params, callback);
    } 
	//导航
    get_nav_list(data,callback) {
        var params = {
            url: 'index/nav',
            type: 'get',
            loading: false,
			data:data
        };
        this.apiRequest(params, callback);
    } 
	//产品分类
	get_category_list(data,callback) {
	    var params = {
	        url: 'index/category',
	        type: 'get',
	        loading: false,
			data:data
	    };
	    this.apiRequest(params, callback);
	} 
	//产品
	get_product_list(data,callback) {
	    var params = {
	        url: 'index/getProductList',
	        type: 'get',
	        loading: false,
			data:data
	    };
	    this.apiRequest(params, callback);
	} 
	//产品详情
	get_product_detail(data,callback) {
	    var params = {
	        url: 'index/getProductDetail',
	        type: 'get',
	        loading: false,
			data:data
	    };
	    this.apiRequest(params, callback);
	} 
	//产品评论
	get_comment_counts(data,callback) {
	    var params = {
	        url: 'index/getCommentCounts',
	        type: 'get',
	        loading: false,
			data:data
	    };
	    this.apiRequest(params, callback);
	} 
	//产品评论
	get_comment_list(data,callback) {
	    var params = {
	        url: 'index/getCommentList',
	        type: 'get',
	        loading: false,
			data:data
	    };
	    this.apiRequest(params, callback);
	} 

	//登录
	login(data,callback) {
	    var params = {
	        url: 'user/login',
	        type: 'post',
	        loading: false,
			data:data
	    };
	    this.apiRequest(params, callback);
	}
 //获取手机号
  take_mobile(data,callback) {
	 var params = {
		 url: 'user/getMobile',
		 type: 'post',
		 loading: true,
		data:data
	 };
	 this.apiRequest(params, callback);
 }
  //帮助中心
get_help_list(callback) {
	 var params = {
		 url: 'index/help',
		 type: 'get',
		 loading: true,

	 };
	 this.apiRequest(params, callback);
 }
 //帮助中心详情
  get_help_detail(data,callback) {
	 var params = {
		 url: 'index/helpDetail',
		 type: 'get',
		 loading: true,
		data:data
	 };
	 this.apiRequest(params, callback);
 }
 //分享配置
 get_share_setting(callback) {
	 var params = {
		 url: 'index/shareSetting',
		 type: 'get',
		 loading: false,

	 };
	 this.apiRequest(params, callback);
 }
 //店铺
 get_store_list(data,callback) {
	 var params = {
		 url: 'index/storeList',
		 type: 'get',
		 loading: true,
		data:data
	 };
	 this.apiRequest(params, callback);
 }
 //店铺详情
 get_store_detail(data,callback) {
	 var params = {
		 url: 'index/storeDetail',
		 type: 'get',
		 loading: false,
		data:data
	 };
	 this.apiRequest(params, callback);
 }
 //到店列表
  get_daodian_list(data,callback) {
    var params = {
      url: 'daodian/getList',
      type:'get',
      data:data,
      loading:true
    };
    this.apiRequest(params,callback);
  }
}

export { Index };
